package com.wl.application.services.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wl.application.entity.Emp;
import com.wl.application.entity.vo.EmpVo;
import com.wl.application.mapper.EmpMapper;
import com.wl.application.services.EmpService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author wl
 * @version 1.0
 * @date 2022/6/16
 * @description:
 */
@Service
public class EmpServiceImpl extends ServiceImpl<EmpMapper, Emp> implements EmpService {

    @Resource
    private EmpMapper empMapper;

    @Override //必须以page结尾才能mybatisplus自动开启分页
    public IPage<EmpVo> empPage(IPage<EmpVo> page, Emp emp1) {
//        return null;
        return baseMapper.getEmpAndDept(page,emp1);
    }

//    @Override
//    public Result
//    EmpAndDept() {
//         List<EmpVo> empVos=empMapper.getEmpAndDept();
//        return Result.ok(empVos);
//    }
}
